package com.liang.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.liang.mall.entity.File;
import com.liang.mapper.FileMapper;
import com.liang.service.FileService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liang
 * @since 2021-05-10
 */
@Service
public class FileServiceImpl extends ServiceImpl<FileMapper, File> implements FileService {

    @Autowired
    FileMapper fileMapper;

    @Override
    public IPage<File> getList(Integer pageNum, Integer pageSize) {

        Page<File> filePage = new Page<>(pageNum, pageSize);

        IPage<File> fileIPage = fileMapper.selectPage(filePage, null);

        return fileIPage;
    }
}
